<?php declare(strict_types=1);


namespace App\Data;


class EventData
{
    public function transformDate(&$data):void
    {
        if(!$data) {
            return ;
        }
        foreach ($data as $index => $item) {
            if(isset($item['start_submit_at'])) {
                $data[$index]['startSubmitAt'] =  $item['start_submit_at'] ? date('Y-m-d H:i:s', $item['start_submit_at']) : '';
            }
            if(isset($item['deathline'])) {
                $data[$index]['deathLine'] =  $item['deathline'] ? date('Y-m-d H:i:s', $item['deathline']) : '';
            }
        }
    }
}